<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 短链接管理
 */
class CreateWxShorturl extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //微信短链接
        Schema::create('wx_shorturls', function (Blueprint $table) {
            $table->increments('id')->comment('自增序号');
            $table->string('name', 50)->default('')->comment('链接名称');
            $table->string('short_url', 100)->default('')->comment('短链接地址');
            $table->string('long_url', 250)->default('')->comment('长链接地址');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('wx_shorturls');
    }
}
